<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$model_name='会员';
$menu_name='user';
$sub_meun_name='list';
$page_name=$model_name."列表";
//error_reporting(0); //抑制所有错误信息
?>

<?php require_once 'public/header.php';?>
<?php require_once 'public/sidebar.php';?>


<div id="content">
  <div id="content-header">
    <div id="breadcrumb">
        <a href="<?php echo site_url($this->config->item('system_manage_path')."welcome");?>" title="系统首页" class="tip-bottom"><i class="icon-home"></i> 系统首页</a>
        <a href="<?php echo site_url($this->config->item('system_manage_path').$menu_name);?>" title="<?php echo $model_name;?>列表" class="tip-bottom"><?php echo $model_name;?>列表</a> <a class="current"><?php echo $model_name;?>管理</a>
    </div>
    <h1><a href="<?php echo site_url($this->config->item('system_manage_path').$menu_name);?>" title="<?php echo $model_name;?>列表" class="tip-bottom"><?php echo $model_name;?>列表</a> <a href="<?php echo site_url($this->config->item('system_manage_path').$menu_name."/add");?>" class="btn btn-primary btn-large fr"><i class="icon-plus icon-white"></i> 添加<?php echo $model_name;?></a></h1> 
  </div>
  <div class="container-fluid">
    <hr>
    <div class="row-fluid">
      <div class="span12">
        <div class="widget-box">
          <?php
		  $attributes = array('name' => 'myform1','id' => 'myform1', 'class' => 'form-horizontal', 'onsubmit' => 'return ConfirmDel();');
		  echo form_open($this->config->item('system_manage_path').'user/save', $attributes);
		  ?>
          <div class="widget-content" style="padding-bottom:0px;">
            <table class="table table-bordered table-striped">
              <thead>
                <tr>
                  <th width="40">选择</th>
                  <th width="5%">ID</th>
                  <th>账号</th>
                   <th width="80">状态</th>
                  <th width="120">操作</th>
                </tr>
              </thead>
              <tbody>
                <?php foreach ($list as $value){ ?>
                <tr>
                  <td class="text-center"><input name='id[]' type='checkbox' onclick="unselectall(this.form)" value='<?php echo $value['id'] ?>' /></td>
                  <td class="text-center"><?php echo $value['id'] ?></td>
                  <td><?php echo $value['adminname'] ?></td>
                  <td class="text-center"><?php if($value['status']=='1'){ ?>开通<?php }else{?>关闭<?php } ?></td>
                  <td class="text-center"><a href="<?php echo site_url($this->config->item('system_manage_path')."user/edit/".$value['id']) ?>" class="btn btn-success btn-mini"><i class="icon-edit icon-white"></i> 编辑</a> <a href="<?php echo site_url($this->config->item('system_manage_path')."user/save/del/".$value['id']) ?>" class="btn btn-danger btn-mini" onClick="return confirm('您确认要删除吗?')"><i class="icon-remove icon-white"></i> 删除</a></td>
                </tr>
                <?php } ?>
              </tbody>
            </table>
          </div>
          <div class="widget-title"> <span class="icon"><input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form)" value="checkbox" /></span>
            <h5>选中本页所有</h5><div class="fl margin-right-10 line-height-30"> 
            <input name="submit0" type='button' id="submit0" onclick="Lockall(this.form)" value='锁定' class="btn btn-info btn-mini" />
            <input name="submit1" type='button' id="submit1" onclick="Unlockall(this.form)" value='解除锁定' class="btn btn-warning btn-mini" />
            <input name="submit2" type='button' id="submit2" onclick="Delall(this.form)" value='彻底删除' class="btn btn-danger btn-mini" />
            <input type="hidden" name="lcomeurl" value="<?php echo uri_string()?>" />
            <input name="action" type="hidden" id="action" value="" /></div>
          </div>
          </form>
        </div>
        
        <div class="pagination alternate">
          <ul>
            <?php echo $this->pagination->create_links();?>
          </ul>
        </div>
        
      </div>
    </div>
  </div>
</div>

<?php require_once 'public/footer.php';?>